///////////////////////////////////////////////////////////////////////////
//
//         InfiniBand FLIT (Credit) Level OMNet++ Simulation Model
//
// Copyright (c) 2004-2013 Mellanox Technologies, Ltd. All rights reserved.
// This software is available to you under the terms of the GNU
// General Public License (GPL) Version 2, available from the file
// COPYING in the main directory of this source tree.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
///////////////////////////////////////////////////////////////////////////

package src;
package src.PktFwd_Ifc;

//
// This module implements simple FDB for the entire switch
//
simple Pktfwd like PktFwd_Ifc
{
	parameters:
        int numPorts;      // number of switch ports
        bool is_cross_connected = default(false); // true indicates the current switch is cross_connected to it's upper level switch
        bool is_HD_mode = default(false);

  	// only used in a cross-connected network
        int cross_connected_upperlevel_numswitch = default(0);
        int switch_index = default(0); 
        int total_level_switch = default(0);
        
        @display("i=abstract/dispatcher");

    gates:
        inout pktfwd_port;
        input routing_info_port; // this is the port where the higher level switches receives direct messages about routing info from the first swicth in every level except the base level (level >=2)

}